package com.venusj.test;

import com.venusj.service.HelloService;

import java.util.ServiceLoader;

/**
 * @author venusj
 * @date 2020/12/7
 */
public class DemoMain {
    public static void main(String[] args) {
        final ServiceLoader<HelloService> services = ServiceLoader.load(HelloService.class);

        for (HelloService service : services)
        {
            System.out.println(service.getClass().getName() + " : " + service.sayHello());
        }
    }
}

